home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / C / Games / Pentominoes 2.0 / Pent code / pent main window.c < prev    next >
Text File  |  1995-07-29  |  10KB  |  20 lines

  1. 1+5+1+3+8+kBottomMargin;
  2.     MyHideWindow(theWindow);
  3.     MySizeWindow(theWindow, w, h, TRUE);
  4.     floatSpace=gShowFloat ? (gAnchorFloat ? 52 : 64) : 0;
  5.     GetMainScreenBounds(&screenRect);
  6.     topLeft.h=screenRect.left+
  7.         (((screenRect.right-screenRect.left)-GetWindowWidth(theWindow))/2);
  8.     topLeft.v=9+screenRect.top+floatSpace+
  9.         (((screenRect.bottom-screenRect.top-floatSpace)-GetWindowHeight(theWindow))/2);
  10.     SetWindowTopLeft(theWindow, topLeft);
  11.     MyMoveWindow(theWindow, topLeft.h, topLeft.v, TRUE);
  12.     if ((offscreenWorldPtr=GetWindowPermanentOffscreenWorld(theWindow))!=0L)
  13.         DisposeOffscreenWorld(offscreenWorldPtr);
  14.     OpenTheMainWindow(theWindow);
  15.     SetPort(theWindow);
  16.     EraseRect(&(theWindow->portRect));
  17.     MyShowWindow(theWindow);
  18.     UpdateTheWindow(theWindow);
  19. }
  20.